package me.zhengjie.modules.assembly.controller;

import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.assembly.entity.Department;
import me.zhengjie.modules.assembly.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/department1")
public class Department1Controller {

    @Autowired
    private IDepartmentService departmentService;

    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public Department getDepartment(@RequestParam("id") String id) {
        return departmentService.selectByPrimaryKey(id);
    }
 }
